package pattern.observer.jdk;

/**
 * Created by boot on 8/31/15.
 */
public class Client {
    public static void main(String[] args) {
        WeatherSubject ws = new WeatherSubject();
        ws.setContent("天气晴朗，阅兵没问题");

        WeatherObserver girlObserver = new WeatherObserver();
        girlObserver.setObserverName("女朋友");

        WeatherObserver mamObserver = new WeatherObserver();
        mamObserver.setObserverName("老妈");

        ws.addObserver(girlObserver);
        ws.addObserver(mamObserver);

        ws.setContent("天不刮风，天不下雨，天上有太阳");
    }

}
